cmake_minimum_required(VERSION 3.10)  # 指定CMake的最小版本要求
project(boost-svr)  # 设置项目名称

# 设置默认的构建类型为Debug
SET(CMAKE_BUILD_TYPE Debug)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# 包含项目中的头文件目录
include_directories(
    ${CMAKE_SOURCE_DIR}/share/network
    ${CMAKE_SOURCE_DIR}/share/utils
  )

file(GLOB SOURCES [^.]*.cpp [^.]*.h)

# 查找Boost库
find_package(Boost REQUIRED COMPONENTS system)

# 包含Boost头文件目录
include_directories(${Boost_INCLUDE_DIRS})

# 添加要编译的源文件
add_executable(svr ${SOURCES})

# 链接Boost库
target_link_libraries(svr ${Boost_LIBRARIES})